package com.yhd.model;


import lombok.Data;
import lombok.experimental.Accessors;

import javax.validation.constraints.Min;
import java.io.Serializable;

/**
 * 分页请求
*/
@Data
@Accessors(chain = true)
public class PageInfo implements Serializable {

    private static final long serialVersionUID = 4893282470341309908L;

    //页码
    @Min(value = 0)
    private Integer pageNum = 1;

    //每页显示数量
    @Min(value = 0)
    private Integer pageSize = 10;

    //是否进行count查询
    private Boolean count = true;

    //排序
    private String orderBy;

    //true且pageSize=0时返回全部结果，false时分页,null时用默认配置
    private Boolean pageSizeZero;

    //设置true 只执行排序查询
    private Boolean orderByOnly = false;

}
